﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="product_sort_edit.aspx.cs" Inherits="product_sort_edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>产品分类信息管理</title>
    <style type="text/css">
       .ContentView
        {
        border:0px;
        padding:0px 0px 0px 0px;
        background-color:White;
        display:inline-table;
        width:390px;
        }
        .TopBorder
        {
        background:#DCDCDC;
        color:black;
        border-bottom:Gray 1px solid;
        border-top:solid 1px black;
        border-left:solid 1px black;
        border-right:solid 1px black;
        }
        .SelectedTopBorder
        {
        background:nonetransparent scrollrepeat 0% 0%;
        color:black;
        border-top:solid 1px black;
        border-left:solid 1px black;
        border-right:solid 1px black;
        }
     
   </style>
   <script type="text/javascript">
 
   </script>
</head>
<body>
<form id="form1" runat="server">
  <div>
    <div style="width:700px; margin:0 auto">
        <table border="0" runat="server" style="height:600px; width:700px; border-collapse:collapse">
          <tr valign="top">
　　　        <td id="Cell1" class="SelectedTopBorder" align="center" style="width:80px; height:25px; border-top:solid 1px black; border-left:solid 1px black; border-right:solid 1px black; ">
　　　        <asp:LinkButton Width="80px" ID="lButtonBig" runat="server" OnClick="lButtonBig_Click">产品大类</asp:LinkButton></td>
　　　        <td style="width:5px; height:25px"></td>
　　　        <td id="Cell2" class="TopBorder" style="width:80px; height:25px; border-top:solid 1px black; border-left:solid 1px black; border-right:solid 1px black;">
　　　        <asp:LinkButton  Width="80px" ID="lButtonSmall" runat="server" OnClick="lButtonSmall_Click">产品细分</asp:LinkButton></td>
　　　        <td style="width:500px"></td>　　　  
　　　    </tr>
　　　    <tr>
　　　        <td style="width:80px; height:25px; border-left:solid 1px black; border-right-width:0; border-top-width:0"></td>
　　　        <td style="width:5px; height:25px; border-top:solid 1px black;"></td>
　　　        <td style="width:80px; height:25px; border-right-width:0; border-top-width:0; border-left-width:0"></td>
　　　        <td style="width:500px; border-top:solid 1px black;border-right:solid 1px black;"></td>　　　  
　　　    </tr>
　　　    <tr valign="top">
　　    　    <td colspan="4" style="width:100%; padding-top:10px;border-left:solid 1px black;border-right:solid 1px black; border-bottom:solid 1px black;">
                <asp:MultiView ID="mVType" runat="server" ActiveViewIndex="0" >
                  <asp:View ID="view1" runat="server">
                     <div style="border:solid 1px; width:456px; margin:0 auto" >
                       <asp:Button Text="添加分类" runat="server" onclick="Unnamed1_Click" />
                     </div>
                     <asp:Panel ID="bigPanel" runat="server" Visible="false">
                       <table rules="all" style=" margin:0 auto; margin-top:10px; width:456px; border:solid 1px #33CCFF">
                        <tr visible="false">
                          <td>大类编号</td>
                          <td>
                            <asp:label id="bigTypeId" runat="server"></asp:label>
                          </td>
                        </tr>
                        <tr>
                          <td>大类名称</td>
                          <td>
                            <asp:TextBox ID = "bigTypeName" runat="server"></asp:TextBox>
                          </td>
                        </tr>
                        <tr>
                          <td colspan="2" style="text-align:center">
                            <asp:Button ID="bigAdd" Text="确定添加" runat="server" onclick="bigAdd_Click" />
                            <asp:Button ID="bigUpdate" Text="确定修改" runat="server" Visible="false" 
                                  onclick="bigUpdate_Click" />
                          </td>
                        </tr>
                      </table>
                      <hr />
                      <hr />
                     </asp:Panel>
                    <div style=" margin:0 auto; margin-top:10px; width:456px; height:30px; text-align:center; font-size:x-large; background-color: #33CCFF" >产品大类
                    </div> 
                    <div style="margin:0 auto;Width:456px;">
                      <asp:GridView ID="bigList" runat="server" Width="456px" 
                            AutoGenerateColumns="false" onrowcommand="bigList_RowCommand" >
                        <Columns>
                          <asp:BoundField HeaderText="分类编号" DataField="BigType_Idint" />
                          <asp:BoundField HeaderText="分类名称" DataField="BigType_Namestr" />
                          
                          <asp:TemplateField HeaderText="修改" >
                             <ItemTemplate>
                                <asp:LinkButton ID="LinkButton5" Text="修改" runat="server" OnClientClick='' CommandName="updateBig" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"BigType_Idint") %>'>
                                </asp:LinkButton>
                             </ItemTemplate>
                          </asp:TemplateField>
                          
                          <asp:TemplateField HeaderText="删除" >
                             <ItemTemplate>
                                <asp:LinkButton Text="删除" runat="server" CommandName="deleteBig" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"BigType_Idint") %>' OnClientClick='<%#  "if (!confirm(\"你确定要删除吗?\")) return false;"%>'>
                                </asp:LinkButton>
                             </ItemTemplate>
                          </asp:TemplateField>
                        </Columns>
                      </asp:GridView>
                      <div style="text-align:center">
                        <asp:LinkButton ID="pageFirst"  runat="server" Text="首页" CommandArgument="First"></asp:LinkButton>
                        &nbsp;
                        <asp:LinkButton ID="pagePrev" runat="server" Text="上一页" CommandArgument="Prev"></asp:LinkButton>
                        &nbsp;
                        <asp:LinkButton ID="pageNext" runat="server" Text="下一页" CommandArgument="Next"></asp:LinkButton>
                        &nbsp;
                        <asp:LinkButton ID="pageLast" runat="server" Text="最后一页" CommandArgument="Last"></asp:LinkButton>
                       </div>
                    </div>
                   
                  </asp:View>
                  <asp:View ID="view2" runat="server">
                    <div style="border:solid 1px; width:456px; margin:0 auto"  >
                      <asp:Button ID="Button1" Text="添加分类" runat="server" onclick="Button1_Click" />
                    </div>
                    <asp:Panel id="smallPanel" runat="server" Visible="false">
                      <table rules="all" style=" margin:0 auto; margin-top:10px; width:456px; border:solid 1px #33CCFF">
                        <tr>
                          <td>分类编号</td>
                          <td>
                            <asp:Label ID="smallTypeId" runat="server"></asp:Label>
                          </td>
                        </tr>
                        <tr>
                          <td>分类名称</td>
                          <td>
                            <asp:TextBox ID = "smallTypeName" runat="server"></asp:TextBox>
                          </td>
                        </tr>
                        <tr>
                          <td>所属大类</td>
                          <td>
                            <asp:DropDownList ID="dropBig" runat="server" Width="128px" ></asp:DropDownList>
                          </td>
                        </tr>
                        <tr>
                          <td colspan="2" style="text-align:center" >
                            <asp:Button ID="smallAdd" Text="确定添加" runat="server" onclick="smallAdd_Click" />
                            <asp:Button ID="smallUpdate" Text="确定修改" runat="server" Visible="false" 
                                  onclick="smallUpdate_Click" />
                          </td>
                        </tr>
                      </table>
                      <hr />
                      <hr />
                    </asp:Panel>                    
                    <div style=" margin:0 auto; margin-top:10px; width:456px; height:30px; text-align:center; font-size:x-large; background-color: #33CCFF" >
                      产品细分
                    </div> 
                    <div style="margin:0 auto;Width:456px ">
                      <asp:GridView ID="smallList" runat="server" Width="456px" 
                            AutoGenerateColumns="false" onrowcommand="smallList_RowCommand">
                        <Columns>
                          <asp:BoundField HeaderText="分类编号" DataField="SmallType_Idint" />
                          <asp:BoundField HeaderText="分类名称" DataField="SmallType_Namestr" />
                          <asp:BoundField HeaderText="大类名称" DataField="BigType_Namestr" />
                         
                          <asp:TemplateField HeaderText="修改" ><ItemTemplate><asp:LinkButton ID="LinkButton5" Text="修改" runat="server" CommandName="updateSmall" 
                              CommandArgument='<%# DataBinder.Eval(Container.DataItem,"SmallType_Idint") %>'></asp:LinkButton></ItemTemplate></asp:TemplateField>
                          
                          <asp:TemplateField HeaderText="删除" ><ItemTemplate><asp:LinkButton Text="删除" runat="server" CommandName="deleteSmall" 
                              CommandArgument='<%#DataBinder.Eval(Container.DataItem,"SmallType_Idint")%>'   OnClientClick='<%#  "if (!confirm(\"你确定要删除吗?\")) return false;"%>' ></asp:LinkButton></ItemTemplate></asp:TemplateField>
                          
                        </Columns>
                      </asp:GridView>
                      <div style="text-align:center">
                        <asp:LinkButton ID="LinkButton1" runat="server" Text="首页" CommandArgument="First"></asp:LinkButton>
                        &nbsp;
                        <asp:LinkButton ID="LinkButton2" runat="server" Text="上一页" CommandArgument="Prev"></asp:LinkButton>
                        &nbsp;
                        <asp:LinkButton ID="LinkButton3" runat="server" Text="下一页" CommandArgument="Next"></asp:LinkButton>
                        &nbsp;
                        <asp:LinkButton ID="LinkButton4" runat="server" Text="最后一页" CommandArgument="Last"></asp:LinkButton>
                      </div>
                    </div>
                  </asp:View>
                </asp:MultiView>
　　　        </td>
　　　    </tr>
　　  　</table>
    </div>
　</div>
</form>
</body>
</html>